﻿<phone:PhoneApplicationPage 
    x:Class="CarBloke.Pages.LogEditPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"     
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="696" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot contains the root grid where all other page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <TextBlock x:Name="VehicleName" Grid.Row="0" Text="chevy prizm" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="175,-65,0,0" Style="{StaticResource PhoneTextTitle1Style}" Opacity=".2" FontSize="125"/>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="{Binding Path=Strings.ApplicationTitle, Source={StaticResource LanguageProvider}}" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="[log type]" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <ScrollViewer x:Name="ContentGrid" Grid.Row="1" Margin="12,0,12,0">
            <StackPanel>
                <Grid x:Name="fuelQuantityGrid" Width="Auto" Height="Auto">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <CheckBox x:Name="fullCheckBox" Grid.Column="0" Content="{Binding Path=Strings._fullTank, Source={StaticResource LanguageProvider}}" IsChecked="True"/>
                    <CheckBox x:Name="missedLogsCheckBox" Grid.Column="1" Content="{Binding Path=Strings._missedLogs, Source={StaticResource LanguageProvider}}" />
                </Grid>
                <TextBlock x:Name="descriptionTextBlock" Text="{Binding Path=Strings._description, Source={StaticResource LanguageProvider}}" Style="{StaticResource PhoneTextSmallStyle}" MouseLeftButtonUp="descriptionTextBlock_MouseLeftButtonUp"/>
                <Border x:Name="descriptionBorder" BorderThickness="0">
                    <TextBox x:Name="descriptionTextBox" TextChanged="descriptionTextBox_TextChanged"/>
                </Border>
                <TextBlock x:Name="odometerTextBlock" Text="{Binding Path=Strings._odometer, Source={StaticResource LanguageProvider}}" Style="{StaticResource PhoneTextSmallStyle}" MouseLeftButtonUp="odometerTextBlock_MouseLeftButtonUp"/>
                <Border x:Name="odometerBorder" BorderThickness="0">
                    <TextBox x:Name="odometerTextBox" InputScope="Number" TextChanged="odometerTextBox_TextChanged"/>
                </Border>

                <TextBlock x:Name="fuelQuantityTextBlock" Text="[fuel label]" Style="{StaticResource PhoneTextSmallStyle}" MouseLeftButtonUp="fuelQuantityTextBlock_MouseLeftButtonUp"/>
                <Border x:Name="fuelQuantityBorder" BorderThickness="0">
                    <TextBox x:Name="fuelQuantityTextBox" InputScope="Number" Grid.Column="0" TextChanged="fuelQuantityTextBox_TextChanged"/>
                </Border>

                <TextBlock x:Name="costTextBlock" Text="{Binding Path=Strings._cost, Source={StaticResource LanguageProvider}}" Style="{StaticResource PhoneTextSmallStyle}" MouseLeftButtonUp="costTextBlock_MouseLeftButtonUp"/>
                <Border x:Name="costBorder" BorderThickness="0">
                    <TextBox x:Name="costTextBox" InputScope="Number" TextChanged="costTextBox_TextChanged"/>
                </Border>

                <TextBlock x:Name="notesTextBlock" Text="{Binding Path=Strings._notes, Source={StaticResource LanguageProvider}}" Style="{StaticResource PhoneTextSmallStyle}" MouseLeftButtonUp="notesTextBlock_MouseLeftButtonUp"/>
                <TextBox x:Name="notesTextBox" Text=""/>
                <TextBlock x:Name="dateTextBlock" Text="{Binding Path=Strings._date, Source={StaticResource LanguageProvider}}" Style="{StaticResource PhoneTextSmallStyle}"  MouseLeftButtonUp="dateTextBlock_MouseLeftButtonUp"/>
                <toolkit:DatePicker x:Name="dateTextBox" ValueChanged="dateTextBox_ValueChanged"/>
            </StackPanel>
        </ScrollViewer>
        
    </Grid>

    <!-- ApplicationBar -->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="appbar_saveButton" IconUri="/Images/AppBar/save.png" Text="save" Click="appbar_saveButton_Click"></shell:ApplicationBarIconButton>
            <shell:ApplicationBarIconButton x:Name="appbar_cancelButton" IconUri="/Images/AppBar/cancel.png" Text="cancel" Click="appbar_cancelButton_Click"></shell:ApplicationBarIconButton>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>
